package GameUI;

import java.util.Scanner;
import java.util.StringJoiner;

public class FUPractice {


	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int k1=sc.nextInt();
		int k2=sc.nextInt();
		int[] exp1=new int[k1];//指数
		int[] exp2=new int[k2];
		double[] coe1=new double[k1];//系数
		double[] coe2=new double[k2];

		for (int i = 0; i < k1; i++) {
			exp1[i]=sc.nextInt();
			coe1[i]=sc.nextDouble();
		}
		for (int i = 0; i < k2; i++) {
			exp2[i]=sc.nextInt();
			coe2[i]=sc.nextDouble();
		}

		int maxExp;
		if(exp1[0]>exp2[0]) maxExp=exp1[0];
		else maxExp=exp2[0];

		int[] sumExp=new int[maxExp];
		double[] sumCoe=new double[maxExp];

		for (int i = 0; i < maxExp; i++) {

		}
	}
}
